package com.jiexinyun.exception;

import com.jiexinyun.error.ErrorCode;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 *
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class GlobalException extends RuntimeException {

    /**
     * 响应状态码
     */
    private ErrorCode errorCode;

    public GlobalException(){

    }

    public GlobalException(ErrorCode errorCode) {
        super(errorCode.getMessage());
        this.errorCode = errorCode;
    }

}
